//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop
USEPACKAGE("vcl50.bpi");
USEUNIT("CAlexMaker.cpp");
USERES("bmp.res");
USEPACKAGE("CtrlStd.bpi");
USEPACKAGE("Eic.bpi");
USEPACKAGE("EICBtrv.bpi");
USEPACKAGE("Outils.bpi");
USERC("VersionPck.rc");
USEPACKAGE("Vcldb50.bpi");
//---------------------------------------------------------------------------
#include <delayimp.h>
//---------------------------------------------------------------------------
#pragma package(smart_init)
//---------------------------------------------------------------------------

//   Source du paquet.
//---------------------------------------------------------------------------
#include <delayimp.h>
static DelayedLoadHook DelayedLoadHookPrec = NULL;

FARPROC WINAPI _EXPDATA MypfnDliNotifyHook(dliNotification dliNotify, DelayLoadInfo * pdli)
{
    if( (dliNotify == dliNotePreLoadLibrary) && stricmp( pdli->szDll, "etat.dll") == 0)
        return (FARPROC)::LoadLibrary( "etat.dll");
    return DelayedLoadHookPrec ? DelayedLoadHookPrec(dliNotify, pdli) : 0;
}
#pragma argsused
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*)
{
if (reason == DLL_PROCESS_ATTACH)
   {
   DelayedLoadHookPrec = __pfnDliNotifyHook;
   __pfnDliNotifyHook = MypfnDliNotifyHook;
   }
else if (reason == DLL_PROCESS_DETACH)
   {
   __FUnloadDelayLoadedDLL("Etat.dll");
   __pfnDliNotifyHook = DelayedLoadHookPrec;
   }
return 1;
}
//---------------------------------------------------------------------------

